package com.acme.bankapp.domain;

import java.util.List;

import com.acme.bankapp.domain.accounting.Account;

/**
 * domain client
 */
public class Client {
	
	final private String name;
	final private Gender gender;

	private List<Account> accounts;	

	Client(String name, Gender gender){
		this.name = name;
		this.gender = gender;
	}

	void setAccounts(List<Account> accounts) {
		this.accounts = accounts;
	}
	
	/**
	 * Accounts list
	 * @return
	 */
	public List<Account> getAccounts(){
		return accounts;
	}
	
	void addAccount(Account account){
		accounts.add(account);
	}
	
	/**
	 * Get clients salutation string
	 * @return client salutation
	 */
	public String getClientSalutation(){
		return gender.getDesc()+ " "+name;
	}

	public Gender getGender() {
		return gender;
	}
	public String getName() {
		return name;
	}
	
}
